# 配置对照

import { Badge } from '@theme';

<Badge text="add in v3.1.0" type="warning" />

> 结合 `webpack chain`通过`this.store.chainName` 可以获取相关配置名,也可以手动根据下面提供名称进行配置 如:

```ts title="emp.config.ts"
import {defineConfig} from '@empjs/cli'
export default defineConfig(store => {
  return {
    chain(config) {
      config.plugin('definePlugin').tap(o => {
        console.log('definePlugin', o)
        return o
      })
    },
  }
})


```

## 参考配置
```ts
export const chainName = {
  rule: {
    mjs: 'mjs',
    typescript: 'typescript',
    javascript: 'javascript',
    sourceMap: 'sourceMapLoader',
    inline: 'inline',
    svg: 'svg',
    image: 'image',
    font: 'fonts',
    svga: 'svga',
    sass: 'sass',
    less: 'less',
    css: 'css',
  },
  use: {
    swc: 'swc',
    sourceMap: 'sourceMapLoader',
    sass: 'sassLoader',
    less: 'lessLoader',
  },
  plugin: {
    bundleAnalyzer: 'bundleAnalyzerPlugin',
    define: 'definePlugin',
    copy: 'copyRspackPlugin',
    progress: 'progressPlugin',
    empShare: 'empShare',
    html: {
      prefix: 'html-plugin-',
      empSharePrefix: 'html-plugin-empShare-',
      importMapPrefix: 'html-plugin-import-map-',
      hooks: {
        empShareLib: 'HtmlEmpShareLibPluginName',
        importMap: 'HtmlImportMapPlugin',
      },
    },
  },
  minimizer: {
    minJs: 'minJs',
    minCss: 'minCss',
  },
}


```